package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Vector;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CopyElementsOfVectorToArrayList {
	public static void main(String[] args) {
		Vector v = new Vector();
		v.add("1");
		v.add("2");
		v.add("3");

		ArrayList arrayList = new ArrayList();
		arrayList.add("One");
		arrayList.add("Two");
		arrayList.add("Three");
		arrayList.add("Four");
		arrayList.add("Five");

		System.out.println("ArrayList 复制 Vector 元素前 : " + arrayList);
		Collections.copy(arrayList, v);
		System.out.println("ArrayList 复制 Vector 元素后 : " + arrayList);
	}
}
